package net.yondervision.hrfsp.sdk.esign.domain.request;

import cn.hutool.http.Method;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.yondervision.hrfsp.sdk.esign.domain.AbstractESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.ESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.request.body.SignflowsRevokeParamBody;
import net.yondervision.hrfsp.sdk.esign.domain.request.path.SignflowsRevokeParamPath;
import net.yondervision.hrfsp.sdk.esign.domain.response.SignflowsRevokeResponse;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/10/12 15:27
 */
@Data
@Builder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SignflowsRevokeRequest extends AbstractESignRequest implements
    ESignRequest<SignflowsRevokeResponse> {

  private SignflowsRevokeParamPath signflowsRevokeParamPath;
  private SignflowsRevokeParamBody signflowsRevokeParamBody;

  public SignflowsRevokeRequest(
      SignflowsRevokeParamPath signflowsRevokeParamPath,
      SignflowsRevokeParamBody signflowsRevokeParamBody) {
    this.signflowsRevokeParamPath = signflowsRevokeParamPath;
    this.signflowsRevokeParamBody = signflowsRevokeParamBody;
    this.setParamPath(signflowsRevokeParamPath);
    this.setParamBody(signflowsRevokeParamBody);
  }

  @Override
  public String getUrl() {
    return "/signflows/{flowId}/revoke";
  }

  @Override
  public Method getMethodType() {
    return Method.PUT;
  }

  @Override
  public Class<SignflowsRevokeResponse> getResponseClass() {
    return SignflowsRevokeResponse.class;
  }

}
